{extend name="common/base"/}
{block name="style"}

<link rel="stylesheet" href="{__CSS__}/user.css?v={:get_system_config('web','version')}" media="all">
{/block}
<!-- 主体 -->
{block name="body"}
{include file="common/header" /}
<div class="user">
	<div class="user-home"><a href="/">首页</a> - 个人中心</div>
	<div class="user-box clearfix">
		<div class="l user-menu">
			{include file="common/usermenu" /}
		</div>
		<div class="r user-right">
			<div class="user-detail">
				<div class="user-detail-h3">
					<form class="layui-form border-t border-x">
						<div class="layui-input-inline">
							<select name="bj_code">
								{volist name="bjlist" id="v"}
								<option value="{$v.bj_code}">{$v.bj_name}</option>
								{/volist}
							</select>
						</div></form>
					班级座位
				</div>
				 <div class="grid-container">
			        <!-- 生成6列8行的网格 -->
			        <div class="grid-item">
			        	{if isset($userPc.11)}
						    {$userPc.11.login_pc}<br>{$userPc.11.st_code}<br>{$userPc.11.name}【{$userPc.11.sex}】
						{else /}
						    T11
						{/if}
					</div>
			        <div class="grid-item">
			        	{if isset($userPc.21)}
						    {$userPc.21.login_pc}<br>{$userPc.21.st_code}<br>{$userPc.21.name}【{$userPc.21.sex}】
						{else /}
						    T21
						{/if}</div>
			        <div class="grid-item">
			        	{if isset($userPc.31)}
						    {$userPc.31.login_pc}<br>{$userPc.31.st_code}<br>{$userPc.31.name}【{$userPc.31.sex}】
						{else /}
						    T31
						{/if}</div>
			        <div class="grid-item">
			        	{if isset($userPc.41)}
						    {$userPc.41.login_pc}<br>{$userPc.41.st_code}<br>{$userPc.41.name}【{$userPc.41.sex}】
						{else /}
						    T41
						{/if}</div>
			        <div class="grid-item">
			        	{if isset($userPc.51)}
						    {$userPc.51.login_pc}<br>{$userPc.51.st_code}<br>{$userPc.51.name}【{$userPc.51.sex}】
						{else /}
						    T51
						{/if}</div>
			        <div class="grid-item">
			        	{if isset($userPc.61)}
						    {$userPc.61.login_pc}<br>{$userPc.61.st_code}<br>{$userPc.61.name}【{$userPc.61.sex}】
						{else /}
						    T61
						{/if}</div>
			        <div class="grid-item">
			        	{if isset($userPc.12)}
						    {$userPc.12.login_pc}<br>{$userPc.12.st_code}<br>{$userPc.12.name}【{$userPc.12.sex}】
						{else /}
						    T12
						{/if}</div>
			        <div class="grid-item">
			        	{if isset($userPc.22)}
						    {$userPc.22.login_pc}<br>{$userPc.22.st_code}<br>{$userPc.22.name}【{$userPc.22.sex}】
						{else /}
						    T22
						{/if}</div>
			        <div class="grid-item">
			        	{if isset($userPc.32)}
						    {$userPc.32.login_pc}<br>{$userPc.32.st_code}<br>{$userPc.32.name}【{$userPc.32.sex}】
						{else /}
						    T32
						{/if}</div>
			        <div class="grid-item">
			        	{if isset($userPc.42)}
						    {$userPc.42.login_pc}<br>{$userPc.42.st_code}<br>{$userPc.42.name}【{$userPc.42.sex}】
						{else /}
						    T42
						{/if}</div>
			        <div class="grid-item">
			        	{if isset($userPc.52)}
						    {$userPc.52.login_pc}<br>{$userPc.52.st_code}<br>{$userPc.52.name}【{$userPc.52.sex}】
						{else /}
						    T52
						{/if}</div>
			        <div class="grid-item">
			        	{if isset($userPc.62)}
						    {$userPc.62.login_pc}<br>{$userPc.62.st_code}<br>{$userPc.62.name}【{$userPc.62.sex}】
						{else /}
						    T62
						{/if}</div>
			        <div class="grid-item">
			        	{if isset($userPc.13)}
						    {$userPc.13.login_pc}<br>{$userPc.13.st_code}<br>{$userPc.13.name}【{$userPc.13.sex}】
						{else /}
						    T13
						{/if}</div>
			        <div class="grid-item">
			        	{if isset($userPc.23)}
						    {$userPc.23.login_pc}<br>{$userPc.23.st_code}<br>{$userPc.23.name}【{$userPc.23.sex}】
						{else /}
						    T23
						{/if}</div>
			        <div class="grid-item">
			        	{if isset($userPc.33)}
						    {$userPc.33.login_pc}<br>{$userPc.33.st_code}<br>{$userPc.33.name}【{$userPc.33.sex}】
						{else /}
						    T33
						{/if}</div>
			        <div class="grid-item">
			        	{if isset($userPc.43)}
						    {$userPc.43.login_pc}<br>{$userPc.43.st_code}<br>{$userPc.43.name}【{$userPc.43.sex}】
						{else /}
						    T43
						{/if}</div>
			        <div class="grid-item">
			        	{if isset($userPc.53)}
						    {$userPc.53.login_pc}<br>{$userPc.53.st_code}<br>{$userPc.53.name}【{$userPc.53.sex}】
						{else /}
						    T53
						{/if}</div>
			        <div class="grid-item">
			        	{if isset($userPc.63)}
						    {$userPc.63.login_pc}<br>{$userPc.63.st_code}<br>{$userPc.63.name}【{$userPc.63.sex}】
						{else /}
						    T63
						{/if}</div>
			        <div class="grid-item">
			        	{if isset($userPc.14)}
						    {$userPc.14.login_pc}<br>{$userPc.14.st_code}<br>{$userPc.14.name}【{$userPc.14.sex}】
						{else /}
						    T14
						{/if}</div>
			        <div class="grid-item">{if isset($userPc.24)}
						    {$userPc.24.login_pc}<br>{$userPc.24.st_code}<br>{$userPc.24.name}【{$userPc.24.sex}】
						{else /}
						    T24
						{/if}</div>
			        <div class="grid-item">
			        	{if isset($userPc.34)}
						    {$userPc.34.login_pc}<br>{$userPc.34.st_code}<br>{$userPc.34.name}【{$userPc.34.sex}】
						{else /}
						    T34
						{/if}</div>
			        <div class="grid-item">
			        	{if isset($userPc.44)}
						    {$userPc.44.login_pc}<br>{$userPc.44.st_code}<br>{$userPc.44.name}【{$userPc.44.sex}】
						{else /}
						    T44
						{/if}</div>
			        <div class="grid-item">
			        	{if isset($userPc.54)}
						    {$userPc.54.login_pc}<br>{$userPc.54.st_code}<br>{$userPc.54.name}【{$userPc.54.sex}】
						{else /}
						    T54
						{/if}</div>
			        <div class="grid-item">{if isset($userPc.64)}
						    {$userPc.64.login_pc}<br>{$userPc.64.st_code}<br>{$userPc.64.name}【{$userPc.64.sex}】
						{else /}
						    T64
						{/if}</div>
			        <div class="grid-item">{if isset($userPc.15)}
						    {$userPc.15.login_pc}<br>{$userPc.15.st_code}<br>{$userPc.15.name}【{$userPc.15.sex}】
						{else /}
						    T15
						{/if}</div>
			        <div class="grid-item">
			        	{if isset($userPc.25)}
						    {$userPc.25.login_pc}<br>{$userPc.25.st_code}<br>{$userPc.25.name}【{$userPc.25.sex}】
						{else /}
						    T25
						{/if}</div>
			        <div class="grid-item">
			        	{if isset($userPc.35)}
						    {$userPc.35.login_pc}<br>{$userPc.35.st_code}<br>{$userPc.35.name}【{$userPc.35.sex}】
						{else /}
						    T35
						{/if}</div>
			        <div class="grid-item">
			        	{if isset($userPc.45)}
						    {$userPc.45.login_pc}<br>{$userPc.45.st_code}<br>{$userPc.45.name}【{$userPc.45.sex}】
						{else /}
						    T45
						{/if}</div>
			        <div class="grid-item">
			        	{if isset($userPc.55)}
						    {$userPc.55.login_pc}<br>{$userPc.55.st_code}<br>{$userPc.55.name}【{$userPc.55.sex}】
						{else /}
						    T55
						{/if}</div>
			        <div class="grid-item">{if isset($userPc.65)}
						    {$userPc.65.login_pc}<br>{$userPc.65.st_code}<br>{$userPc.65.name}【{$userPc.65.sex}】
						{else /}
						    T65
						{/if}</div>
			        <div class="grid-item">{if isset($userPc.16)}
						    {$userPc.16.login_pc}<br>{$userPc.16.st_code}<br>{$userPc.16.name}【{$userPc.16.sex}】
						{else /}
						    T16
						{/if}</div>
			        <div class="grid-item">{if isset($userPc.26)}
						    {$userPc.26.login_pc}<br>{$userPc.26.st_code}<br>{$userPc.26.name}【{$userPc.26.sex}】
						{else /}
						    T26
						{/if}</div>
			        <div class="grid-item">
			        	{if isset($userPc.36)}
						    {$userPc.36.login_pc}<br>{$userPc.36.st_code}<br>{$userPc.36.name}【{$userPc.36.sex}】
						{else /}
						    T36
						{/if}</div>
			        <div class="grid-item">
			        	{if isset($userPc.46)}
						    {$userPc.46.login_pc}<br>{$userPc.46.st_code}<br>{$userPc.46.name}【{$userPc.46.sex}】
						{else /}
						    T46
						{/if}</div>
			        <div class="grid-item">
			        	{if isset($userPc.56)}
						    {$userPc.56.login_pc}<br>{$userPc.56.st_code}<br>{$userPc.56.name}【{$userPc.56.sex}】
						{else /}
						    T56
						{/if}</div>
			        <div class="grid-item">
			        	{if isset($userPc.66)}
						    {$userPc.66.login_pc}<br>{$userPc.66.st_code}<br>{$userPc.66.name}【{$userPc.66.sex}】
						{else /}
						    T66
						{/if}</div>
			        <div class="grid-item">
			        	{if isset($userPc.17)}
						    {$userPc.17.login_pc}<br>{$userPc.17.st_code}<br>{$userPc.17.name}【{$userPc.17.sex}】
						{else /}
						    T17
						{/if}</div>
			        <div class="grid-item">
			        	{if isset($userPc.27)}
						    {$userPc.27.login_pc}<br>{$userPc.27.st_code}<br>{$userPc.27.name}【{$userPc.27.sex}】
						{else /}
						    T27
						{/if}</div>
			        <div class="grid-item">
			        	{if isset($userPc.37)}
						    {$userPc.37.login_pc}<br>{$userPc.37.st_code}<br>{$userPc.37.name}【{$userPc.37.sex}】
						{else /}
						    T37
						{/if}</div>
			        <div class="grid-item">
			        	{if isset($userPc.47)}
						    {$userPc.47.login_pc}<br>{$userPc.47.st_code}<br>{$userPc.47.name}【{$userPc.47.sex}】
						{else /}
						    T47
						{/if}</div>
			        <div class="grid-item">
			        	{if isset($userPc.57)}
						    {$userPc.57.login_pc}<br>{$userPc.57.st_code}<br>{$userPc.57.name}【{$userPc.57.sex}】
						{else /}
						    T57
						{/if}</div>
			        <div class="grid-item"> 
			        	{if isset($userPc.67)}
						    {$userPc.67.login_pc}<br>{$userPc.67.st_code}<br>{$userPc.67.name}【{$userPc.67.sex}】
						{else /}
						    T67
						{/if}</div>
			        <div class="grid-item">
			        	{if isset($userPc.18)}
						    {$userPc.18.login_pc}<br>{$userPc.18.st_code}<br>{$userPc.18.name}【{$userPc.18.sex}】
						{else /}
						    T18
						{/if}</div>
			        <div class="grid-item">
			        	{if isset($userPc.28)}
						    {$userPc.28.login_pc}<br>{$userPc.28.st_code}<br>{$userPc.28.name}【{$userPc.28.sex}】
						{else /}
						    T28
						{/if}</div>
			        <div class="grid-item">
			        	{if isset($userPc.38)}
						    {$userPc.38.login_pc}<br>{$userPc.38.st_code}<br>{$userPc.38.name}【{$userPc.38.sex}】
						{else /}
						    T38
						{/if}</div>
			        <div class="grid-item">
			        	{if isset($userPc.48)}
						    {$userPc.48.login_pc}<br>{$userPc.48.st_code}<br>{$userPc.48.name}【{$userPc.48.sex}】
						{else /}
						    T48
						{/if}</div>
			        <div class="grid-item">
			        	{if isset($userPc.58)}
						    {$userPc.58.login_pc}<br>{$userPc.58.st_code}<br>{$userPc.58.name}【{$userPc.58.sex}】
						{else /}
						    T58
						{/if}</div>
			        <div class="grid-item">
			        	{if isset($userPc.68)}
						    {$userPc.68.login_pc}<br>{$userPc.68.st_code}<br>{$userPc.68.name}【{$userPc.68.sex}】
						{else /}
						    T68
						{/if}</div>
			    </div>


			</div>
		</div>
	</div>
</div>
{/block}
<!-- /主体 -->

<!-- 脚本 -->
{block name="script"}
<script language="javascript" src="{__JS__}/laydate/laydate.js"></script>
<script>





	//取消
	$('.edit-cancel').on('click', function () {
		window.location.href = '/home/user/index';
	});

	//保存用户信息
	$('.edit-save').on('click', function () {
		var pwd = $('[name="pwd"]').val(),
			newpwd = $('[name="newpwd"]').val(),
			newpwd2 = $('[name="newpwd2"]').val();
			
		if (pwd == '') {
			layer.msg('原密码不能为空');
			return;
		}
		if (newpwd == '' ) {
			layer.msg('新密码不能为空');
			return;
		}
		if (newpwd != newpwd2) {
			layer.msg('密码确认不正确');
			return;
		}



		$.ajax({
			url: "/home/user/password_submit",
			data: $('#userPwd').serialize(),
			type: 'post',
			async: false,
			success: function (res) {
				layer.msg(res.msg);
				if (res.code === 0) {
					setTimeout(function () {
						window.location.href = "{:url('/home/user/index')}";
					}, 1500);
				}
			}
		})
	});
</script>
{/block}
<!-- /脚本 -->